package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("fos.txt",true);
//        String line="变身神兵，天津，正义力量";
//        byte[] date=line.getBytes(StandardCharsets.UTF_8);
//        fos.write(date);
//        line="。魔兵天津";
//        fos.write(line.getBytes(StandardCharsets.UTF_8));
        fos.write("魔兵凤凰".getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");
        fos.close();
    }
}
